<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    /* 设置当前父容器水平居中   margin: auto;  仅有水平居中效果*/
    .box {
        margin: auto; 
        position: relative;
        width: 202px;
        height: 120px;
        border-radius: 15px;
        background-color: skyblue;
    }

    /* 设置居中基准竖线 */
    .box .line {
        position: absolute;
        top: 0;
        left: 50%;
        margin: auto;
        width: 1px;
        height: 120px;
        background-color: black;
    }

    /* 设置水平居中基准线 */
    .box .line2 {
        position: absolute;
        top: 50%;
        left: 0;
        margin: auto;
        width: 201px;
        height: 1px;
        background-color: black;
    }

    /* 内容盒子样式设置 */
    .box .sub {
        position: relative;
        left: 0.5px;
        top: 10px;
        width: 200px;
        height: 100px;
        background-color: tan;
        border-radius: 15px;
    }

    /* 无序列表使用IFC设置  
    ul 即使是将style 为none 还是有大小占用 F12 可以看到有个padding-inline-start: 40px; 的开始距离设置
    */
    .sub ul {
        position: relative;
        top: 40px;
        text-align: center;
        background-color: brown;
        list-style: none;
        padding-inline-start: 0px;
        font-size: 0;
    }

    /* 无需列表子元素样式设置 */
    ul li {
        width: 20px;
        height: 20px;
        border-radius: 10px;
        font-size: 16px;
        background-color: white;
        display: inline-block;
    }
</style>

<body>
    <div class="box">
        <div class="sub">
            <ul>
                <li>1</li>
                <li>2</li>
                <li>3</li>
                <li>4</li>
            </ul>
        </div>
        <div class="line"></div>
        <div class="line2"></div>
    </div>

</body>

</html>